<% form_tag(:controller => 'search', :action => 'results') do %>
  <%= text_field_tag(:form_terms, @terms.nil? ? "" : @terms, :size => 30) %>
  <%= submit_tag(l(:search), :class => "input-button") %>
  <input type="hidden" name="locale" value="<%= session[:locale] %>">
<% end %>
<p class="language_list">
<% @languages.each_with_index do |language, index| %>
<%= index == 0 ? "" : " | " %><%= link_to language.name, "/?locale=" + language.code %>
<% end %>
</p>